package com.ruoyi.shopping.mapper;

import java.util.List;

import com.ruoyi.dto.MallProductFullReductionDto;
import com.ruoyi.shopping.domain.MallProductFullReduction;
import org.apache.ibatis.annotations.Param;

/**
 * 产品满减(只针对同商品)Mapper接口
 * 
 * @author ruoyi
 * @date 2024-11-20
 */
public interface MallProductFullReductionMapper 
{
    /**
     * 查询产品满减(只针对同商品)
     * 
     * @param id 产品满减(只针对同商品)主键
     * @return 产品满减(只针对同商品)
     */
    public MallProductFullReduction selectMallProductFullReductionById(Long id);

    /**
     * 查询产品满减(只针对同商品)列表
     * 
     * @param mallProductFullReduction 产品满减(只针对同商品)
     * @return 产品满减(只针对同商品)集合
     */
    public List<MallProductFullReduction> selectMallProductFullReductionList(MallProductFullReduction mallProductFullReduction);

    /**
     * 新增产品满减(只针对同商品)
     * 
     * @param mallProductFullReduction 产品满减(只针对同商品)
     * @return 结果
     */
    public int insertMallProductFullReduction(MallProductFullReduction mallProductFullReduction);

    /**
     * 修改产品满减(只针对同商品)
     * 
     * @param mallProductFullReduction 产品满减(只针对同商品)
     * @return 结果
     */
    public int updateMallProductFullReduction(MallProductFullReduction mallProductFullReduction);

    /**
     * 删除产品满减(只针对同商品)
     * 
     * @param id 产品满减(只针对同商品)主键
     * @return 结果
     */
    public int deleteMallProductFullReductionById(Long id);

    /**
     * 批量删除产品满减(只针对同商品)
     * 
     * @param ids 需要删除的数据主键集合
     * @return 结果
     */
    public int deleteMallProductFullReductionByIds(Long[] ids);

    /**
     * 批量新增产品满减(只针对同商品)
     * @param fullArr
     */
    void batchMallProductFullReduction(List<MallProductFullReductionDto> list);


    /**
     * 根据商品id查询产品满减(只针对同商品)
     * @param id
     * @return
     */
    List<MallProductFullReduction> selectMallProductFullReductionByList(Long id);

    /**
     * 批量修改产品满减(只针对同商品)
     * @param list
     */

    void batchUpdateMallProductFullReduction(@Param("list") List<MallProductFullReductionDto> list);

    int selectMallProductFullReductionCount(@Param("productId")Long productId);

    /**
     * 根据商品id删除产品满减(只针对同商品)
     * @param id
     */
    void deleteMallProductFullReductionByProductId(Long id);
}
